perm filename FOO1.PUB[LSP,JRA] blob sn#303761 filedate 1977-09-02 generic text, type T, neo UTF8
.Sec(Symbolic Expressions,Symbolic expressions)
.SS(Introduction)
.FP
If pressed for details we might attempt a more elaborate
characterization like the following:
.pt24;
.BEGIN GROUP;
.ONCE indent 5,5
%21.%* %3zero%* is an element of %dN%*.
.ONCE indent 0,5;
%2II%*###%22.%* If %3n%* is in %dN%* then  the %3successor%* of %3n%* is in %dN%*.
.ONCE indent 5,5
.SELECT 1;
%23.%* The only elements of %dN%* are those created by finitely many applications 
of rules %21%* and %22%*.
.END
.FP
Definition %2II%* appears to be completely at the other end of the spectrum;
but unsatisfactory.

We shall refer to the digit representation as %2numerals%* and reserve the
term, %2natural number%1, for the abstract object.
Thus numerals denote, stand for, or represent the abstract objects called
natural numbers; and definition %2I%1 is better stated as: "a natural number
can be represented as a finite sequence of digits".


.BEGIN "x1" GROUP;
.P117:
The basic content of an inductive definition
of a set of objects consists of three parts: 
.BEGIN INDENT 10,10;
.PT24;
(1) A description of an initial set of objects; the elements of this
set are the initial elements of the set we are describing in the
inductive definition.
.END
.fp;
%2IND%*
.BEGIN indent 10,10;
(2) Given the description of some existing elements
in the set, we are given a means of constructing more elements.  
.PT2;
(3) A termination clause, saying that the only elements in the set are those
which gained admittance by either (1) or (2).
.END
.END "x1"
.PT24;
.FP
We can recast the positional notation description as an inductive definition.

.BEGIN GROUP;
.PT24;
.NL;
%21.%*##A numeral is a digit
.NL;
%22.%*##If %3n%* is a numeral then %3n%* followed by a digit is a numeral.
.NL;
%23.%1##The only numerals are those created by finitely many applications of %21%* and %22%*.
.END
.PT24;
.FP;
In words, "a numeral is a digit, or a numeral followed by a digit".



.BEGIN TABIT1(15);
.BOXA
.ONCE  INDENT 0
<numeral>\::= <digit>
.PT2
<numeral>\::= <numeral><digit>
.FP
As an abbreviation, the  two BNF equations may also be written:
.ONCE INDENT 0;
<numeral>\::= <digit> | <numeral><digit>.
.BOXB
.END

It will be convenient to have notations for the abstract objects
as well as notations for the syntactic representations. The BNF equations
describe syntactic classes; for example, the set generated by
<numeral> is the syntactic class of numerals⊗↓Note we could have written
<numeral>#::=#<digit> and <numeral>#::=#<digit><numeral>, generating the same
class, but in a different order. Questions of syntax and grammars
will not be stressed in this book. See ⊗↑[Aho#72]↑.←.
When we are talking about a syntactic class of objects we will 

.ss(Weizenbaum example)

.BEGIN TURN ON "\";NOFILL;TABS 5,8,11,26,29,44,49,52,57,60,73;
.KRK
.GROUP
The flow of symbol table creation is:
.BOXA
\\%3f[2;3]\\x%82%* + y%1
\\E%40%*\\\E%41%*\\\E%40%*
\  \| /\      \| E%40%*\\  \| /
\\______ =>\______\=>\______  %1return with value %37%1.
\ %3f\| λ[[x;y] x%82%* + y]%1  \%3x\| 2\  \f\| λ[[x;y] ... ]
\\\\ y\| 3%1
.BOXB
.FP
Compare this sequence to the example on {yon(P129)}.
.END
.BEGIN GROUP;
The sequence of tables corresponds to the evaluation sequence:
.BOXA
.BEGIN CENTERIT;GROUP;turn off "{","}";
←%3eval[%eR%f( %3f[2;3] %f)%3; %eR%f( %3{<f , λ[[x;y] x%82%* +y]>} %f)%3]
←↓
←%3eval[%eR%f( %3x%82%* + y %f)%3; %eR%f( %3{<x, 2>, <y, 3>, <f , λ[[x;y] x%82%* +y]>} %f)%3]
←↓
←%37%1
.BOXB
.END
.END
.FILL;

.ss(right indent example)
.BEGIN "PREF"
.PREF
.EP;
"... it is important not to lose sight of the fact that there is a difference
between training and education.  If computer science is a fundamental discipline,
then university education in this field should emphasize enduring fundamental
principles rather than transient current technology."
.PT24;
.BEGIN TURN ON"→";
→Peter Wegner, %3Three Computer Cultures%*#[Weg#70]#######
.END
.PT24
.PT24
.PT2
.FP
This text is nominally about LISP and data structures. However, in the process